package com.huolian.student.entity;

import java.util.Scanner;

public class Student {
    private  String name;
    private int age;
    private String studentID;


    public Student(String name,int age,String studentID){
        this.name = name;
        this.age = age;
        this.studentID = studentID;
    }
    public void  printInfo(){
        System.out.println("Name:"+name+",Age:"+age+",Student ID:"+studentID);
    }
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        //输入学生信息
        System.out.print("Enter name:");
        String name = scanner.nextLine();
        System.out.print("Enter age:");
        int age = scanner.nextInt();
        scanner.nextLine();
        System.out.print("Enter student ID: ");
        String studentID = scanner.nextLine();

        //创建学生对象并打印信息
        Student student = new Student(name,age,studentID);
        student.printInfo();
    }
}
